package com.caidan.comsumer;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @项目名 rabbit-mq-learning
 * @描述 启动类
 * @作者 wzy
 * @时间 2024/5/18 18:16
 */
@SpringBootApplication
public class ApplicationBootStarter {
    public static void main(String[] args) {
        SpringApplication.run(ApplicationBootStarter.class,args);
    }


//    消息转换器
    @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}
